{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <!-- Panel Other -->
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>用户列表</h5>
        </div>
        <div class="ibox-content">
            <!--搜索框开始-->
            <div class="row">
                <div class="col-sm-12">
                    <div  class="col-sm-2" style="width: 100px">
                        <div class="input-group" >
                            <a href="{:url('addSellerType')}"><button class="btn btn-outline btn-primary" type="button">添加商户分类</button></a>
                        </div>
                    </div>
                </div>
            </div>
            <!--搜索框结束-->
            <div class="hr-line-dashed"></div>
            <div class="example-wrap">
                <div class="example">
                    <table class="table table-bordered table-hover">
                        <thead>
                            <tr class="long-tr">
                                <th>ID</th>
                                <th>名称</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody id="list-content">
                          {volist name="data" id="vo"}
                              <tr class="long-td">
                                  <td>{$vo.id}</td>
                                  <td>{$vo.name}</td>
                                  <td>
                                  {eq name="vo.is_del" value="1"}
                                      <a href="{:url('editSellerType',array('id'=>$vo.id))}" class="btn btn-primary btn-xs"><i class="fa fa-paste"></i> 编辑</a>&nbsp;&nbsp;
                                      <a href="javascript:;" onclick="delSellerType({$vo.id})" class="btn btn-danger btn-xs"><i class="fa fa-trash-o"></i> 删除</a>
                                  {/eq}
                                  </td>
                              </tr>
                          {/volist}
                        </tbody>
                    </table>
                </div>
            </div>
            <!-- End Example Pagination -->
        </div>
    </div>
</div>
<!-- End Panel Other -->
</div>
{include file="public/footer" /}


<script type="text/javascript">
    function delSellerType(id) {
        $.post('{:url("delSellerType")}',{'id':id},function(data){
            console.log(data);
        },'json');
    }

</script>
</body>
</html>
